<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>输入提示</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
    	function isnum(){
    		var phone = document.getElementById("phone").value;
    		if(phone==""||isNaN(phone)){
    			alert("输入数据非法！！！");
    		}
    	}
    </script>
  </head>
  
  <body>
   	<input id="phone" type="text" placeholder="输入不超过11位的数字" maxlength="11"/>
   	<button type="button" onclick="isnum()">点击</button>
  </body>
</html>
